import request from '@/utils/request'

// 查询帮扶小组列表
export function listHelpGroup(query) {
  return request({
    url: '/user/helpGroup/list',
    method: 'get',
    params: query
  })
}

// 查询帮扶小组详细
export function getHelpGroup(helpGroupId) {
  return request({
    url: '/user/helpGroup/' + helpGroupId,
    method: 'get'
  })
}

export function getHelpGroupByUserId(userId) {
  return request({
    url: '/user/helpGroup/listByUserId/' + userId,
    method: 'get'
  })
}

// 新增帮扶小组
export function addHelpGroup(data) {
  return request({
    url: '/user/helpGroup',
    method: 'post',
    data: data
  })
}

// 修改帮扶小组
export function updateHelpGroup(data) {
  return request({
    url: '/user/helpGroup',
    method: 'put',
    data: data
  })
}

// 删除帮扶小组
export function delHelpGroup(helpGroupId) {
  return request({
    url: '/user/helpGroup/' + helpGroupId,
    method: 'delete'
  })
}
